package com.team11.server.service.admin;

import com.team11.server.mapper.Admin_UpdatePleader_Mapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.HashMap;

@Service
public class Admin_UpdatePleader_Service {
    @Autowired
    private Admin_UpdatePleader_Mapper admin_updatePleader_mapper;
    public String updatePleader(HashMap<String,Object> map){
        Integer t=admin_updatePleader_mapper.UpdatePleader(map);
        if (t>0){
            return "设置成功";
        }
        else return "设置失败";
    }
    public String SelPleader(Integer pId){
       Integer t= admin_updatePleader_mapper.SelPleader(pId);
       if (t!=null){
           return "已有组长";
       }
       else return "1";
    }
    public String SelSInP(HashMap<String,Object> map){
        Integer t=admin_updatePleader_mapper.SelSInP(map);
        if (t>0){
            return "1";
        }
        else return "学生不在此小组";
    }
}
